<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>我的订单 - 钓鱼小程序</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        /* 移动端滚动条优化 - 隐藏滚动条 */
        ::-webkit-scrollbar {
            display: none;
        }
        
        * {
            -ms-overflow-style: none;
            scrollbar-width: none;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: #f5f7fa;
            padding-bottom: 60px;
            padding-top: 100px;
            color: #333;
            line-height: 1.6;
            max-width: 375px;
            margin: 0 auto;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        .header {
            position: fixed;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: 375px;
            background: #3498DB;
            color: white;
            padding: 12px 16px;
            display: flex;
            align-items: center;
            gap: 12px;
            z-index: 100;
            justify-content: space-between;
        }

        .back-btn {
            background: none;
            border: none;
            color: white;
            font-size: 18px;
            cursor: pointer;
        }

        .header h1 {
            font-size: 18px;
            font-weight: 600;
            flex: 1;
            text-align: center;
        }

        /* 小程序胶囊按钮 */
        .capsule-btn {
            background: rgba(255,255,255,0.2);
            border-radius: 16px;
            padding: 6px 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .capsule-btn .dot {
            width: 4px;
            height: 4px;
            background: white;
            border-radius: 50%;
        }

        .order-tabs {
            position: fixed;
            top: 50px;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: 375px;
            background: rgba(255,255,255,0.95);
            backdrop-filter: blur(10px);
            padding: 12px 0;
            border-bottom: 1px solid rgba(232,232,232,0.5);
            overflow-x: auto;
            z-index: 99;
        }

        .tab-list {
            display: flex;
            gap: 24px;
            padding: 0 16px;
        }

        .tab-item {
            font-size: 14px;
            color: #7f8c8d;
            white-space: nowrap;
            cursor: pointer;
            padding: 8px 0;
            position: relative;
            transition: color 0.2s ease;
        }

        .tab-item.active {
            color: #3498DB;
            font-weight: 600;
        }

        .tab-item.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: #3498DB;
            border-radius: 1px;
        }

        .main-content {
            flex: 1;
            padding: 16px;
        }

        .order-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .order-card {
            background: white;
            border-radius: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            overflow: hidden;
        }

        .order-header {
            padding: 16px;
            border-bottom: 1px solid #f0f0f0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .order-info {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .order-number {
            font-size: 14px;
            color: #333;
            font-weight: 500;
        }

        .order-time {
            font-size: 12px;
            color: #666;
        }

        .order-status {
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
        }

        .status-unpaid {
            background: #fff3cd;
            color: #856404;
        }

        .status-paid {
            background: #d1ecf1;
            color: #0c5460;
        }

        .status-shipped {
            background: #d4edda;
            color: #155724;
        }

        .status-completed {
            background: #f8d7da;
            color: #721c24;
        }

        .order-products {
            padding: 16px;
        }

        .product-item {
            display: flex;
            gap: 12px;
            margin-bottom: 12px;
        }

        .product-item:last-child {
            margin-bottom: 0;
        }

        .product-image {
            width: 60px;
            height: 60px;
            border-radius: 6px;
            background: #f0f0f0;
            object-fit: cover;
        }

        .product-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .product-title {
            font-size: 14px;
            font-weight: 500;
            line-height: 1.3;
            color: #333;
        }

        .product-specs {
            font-size: 12px;
            color: #666;
        }

        .product-price-qty {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 4px;
        }

        .product-price {
            font-size: 14px;
            font-weight: 600;
            color: #e74c3c;
        }

        .product-qty {
            font-size: 12px;
            color: #666;
        }

        .order-footer {
            padding: 16px;
            border-top: 1px solid #f0f0f0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .order-total {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 2px;
        }

        .total-items {
            font-size: 12px;
            color: #666;
        }

        .total-price {
            font-size: 16px;
            font-weight: 600;
            color: #e74c3c;
        }

        .order-actions {
            display: flex;
            gap: 8px;
        }

        .action-btn {
            padding: 6px 16px;
            border: 1px solid #ddd;
            border-radius: 16px;
            background: white;
            color: #666;
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }

        .action-btn.primary {
            background: #3498DB;
            color: white;
            border-color: #3498DB;
        }

        .action-btn:hover {
            transform: translateY(-1px);
        }

        .tab-bar {
            position: fixed;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 100%;
            max-width: 375px;
            background: white;
            border-top: 1px solid #e8e8e8;
            display: flex;
            height: 60px;
        }

        .tab-bar-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            color: #7f8c8d;
            font-size: 12px;
        }

        .tab-bar-item.active {
            color: #3498DB;
        }

        .tab-bar-icon {
            font-size: 20px;
        }
    </style>
</head>
<body>
    <div class="header">
        <button class="back-btn">←</button>
        <h1>我的订单</h1>
        <div class="capsule-btn">
            <div class="dot"></div>
            <div class="dot"></div>
            <div class="dot"></div>
        </div>
    </div>

    <div class="order-tabs">
        <div class="tab-list">
            <div class="tab-item active" onclick="switchTab(this, 'all')">全部</div>
            <div class="tab-item" onclick="switchTab(this, 'unpaid')">待付款</div>
            <div class="tab-item" onclick="switchTab(this, 'paid')">待发货</div>
            <div class="tab-item" onclick="switchTab(this, 'shipped')">待收货</div>
            <div class="tab-item" onclick="switchTab(this, 'completed')">已完成</div>
        </div>
    </div>

    <div class="main-content">
        <div class="order-list" id="orderList">
            <!-- 订单列表 -->
            <div class="order-card" onclick="goToOrderDetail('unpaid')">
                <div class="order-header">
                    <div class="order-info">
                        <div class="order-number">订单号：202401150001</div>
                        <div class="order-time">2024-01-15 14:30</div>
                    </div>
                    <div class="order-status status-unpaid">待付款</div>
                </div>
                <div class="order-products">
                    <div class="product-item">
                        <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Crect width='60' height='60' fill='%23f0f0f0'/%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' dy='0.3em' font-family='Arial' font-size='10' fill='%23999'%3E鱼竿%3C/text%3E%3C/svg%3E" alt="碳素鱼竿" class="product-image">
                        <div class="product-info">
                            <div class="product-title">碳素超轻鱼竿 3.6米台钓竿</div>
                            <div class="product-specs">长度: 3.6米 | 调性: 28调</div>
                            <div class="product-price-qty">
                                <span class="product-price">¥168.00</span>
                                <span class="product-qty">x1</span>
                            </div>
                        </div>
                    </div>
                    <div class="product-item">
                        <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Crect width='60' height='60' fill='%23f0f0f0'/%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' dy='0.3em' font-family='Arial' font-size='10' fill='%23999'%3E鱼线%3C/text%3E%3C/svg%3E" alt="尼龙鱼线" class="product-image">
                        <div class="product-info">
                            <div class="product-title">进口尼龙鱼线 100米装</div>
                            <div class="product-specs">线号: 2.0号 | 拉力: 8.5kg</div>
                            <div class="product-price-qty">
                                <span class="product-price">¥35.00</span>
                                <span class="product-qty">x2</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="order-footer">
                    <div class="order-total">
                        <div class="total-items">共2件商品</div>
                        <div class="total-price">¥218.00</div>
                    </div>
                    <div class="order-actions">
                        <button class="action-btn">取消订单</button>
                        <button class="action-btn primary">立即支付</button>
                    </div>
                </div>
            </div>

            <div class="order-card" onclick="goToOrderDetail('paid')">
                <div class="order-header">
                    <div class="order-info">
                        <div class="order-number">订单号：202401140002</div>
                        <div class="order-time">2024-01-14 16:20</div>
                    </div>
                    <div class="order-status status-paid">待发货</div>
                </div>
                <div class="order-products">
                    <div class="product-item">
                        <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Crect width='60' height='60' fill='%23f0f0f0'/%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' dy='0.3em' font-family='Arial' font-size='10' fill='%23999'%3E鱼饵%3C/text%3E%3C/svg%3E" alt="野战蓝鲫" class="product-image">
                        <div class="product-info">
                            <div class="product-title">野战蓝鲫鱼饵套装 300g</div>
                            <div class="product-specs">适合: 鲫鱼 | 季节: 四季通用</div>
                            <div class="product-price-qty">
                                <span class="product-price">¥45.00</span>
                                <span class="product-qty">x1</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="order-footer">
                    <div class="order-total">
                        <div class="total-items">共1件商品</div>
                        <div class="total-price">¥45.00</div>
                    </div>
                    <div class="order-actions">
                        <button class="action-btn">联系客服</button>
                    </div>
                </div>
            </div>

            <div class="order-card" onclick="goToOrderDetail('shipped')">
                <div class="order-header">
                    <div class="order-info">
                        <div class="order-number">订单号：202401130003</div>
                        <div class="order-time">2024-01-13 10:15</div>
                    </div>
                    <div class="order-status status-shipped">待收货</div>
                </div>
                <div class="order-products">
                    <div class="product-item">
                        <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Crect width='60' height='60' fill='%23f0f0f0'/%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' dy='0.3em' font-family='Arial' font-size='10' fill='%23999'%3E钓箱%3C/text%3E%3C/svg%3E" alt="多功能钓箱" class="product-image">
                        <div class="product-info">
                            <div class="product-title">多功能钓鱼箱 大容量</div>
                            <div class="product-specs">尺寸: 45x28x26cm | 材质: ABS</div>
                            <div class="product-price-qty">
                                <span class="product-price">¥188.00</span>
                                <span class="product-qty">x1</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="order-footer">
                    <div class="order-total">
                        <div class="total-items">共1件商品</div>
                        <div class="total-price">¥188.00</div>
                    </div>
                    <div class="order-actions">
                        <button class="action-btn">查看物流</button>
                        <button class="action-btn primary">确认收货</button>
                    </div>
                </div>
            </div>

            <div class="order-card" onclick="goToOrderDetail('completed')">
                <div class="order-header">
                    <div class="order-info">
                        <div class="order-number">订单号：202401120004</div>
                        <div class="order-time">2024-01-12 09:30</div>
                    </div>
                    <div class="order-status status-completed">已完成</div>
                </div>
                <div class="order-products">
                    <div class="product-item">
                        <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Crect width='60' height='60' fill='%23f0f0f0'/%3E%3Ctext x='50%25' y='50%25' text-anchor='middle' dy='0.3em' font-family='Arial' font-size='10' fill='%23999'%3E浮漂%3C/text%3E%3C/svg%3E" alt="纳米浮漂" class="product-image">
                        <div class="product-info">
                            <div class="product-title">纳米浮漂套装 8支装</div>
                            <div class="product-specs">材质: 纳米 | 适合: 台钓</div>
                            <div class="product-price-qty">
                                <span class="product-price">¥85.00</span>
                                <span class="product-qty">x1</span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="order-footer">
                    <div class="order-total">
                        <div class="total-items">共1件商品</div>
                        <div class="total-price">¥85.00</div>
                    </div>
                    <div class="order-actions">
                        <button class="action-btn">申请售后</button>
                        <button class="action-btn primary">再次购买</button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="tab-bar">
        <div class="tab-bar-item">
            <div class="tab-bar-icon">🏠</div>
            <div>首页</div>
        </div>
        <div class="tab-bar-item">
            <div class="tab-bar-icon">🛒</div>
            <div>商城</div>
        </div>
        <div class="tab-bar-item active">
            <div class="tab-bar-icon">📦</div>
            <div>订单</div>
        </div>
        <div class="tab-bar-item">
            <div class="tab-bar-icon">👤</div>
            <div>我的</div>
        </div>
    </div>

    <script>
        // 切换标签页
        function switchTab(element, type) {
            // 移除所有活跃状态
            document.querySelectorAll('.tab-item').forEach(tab => {
                tab.classList.remove('active');
            });
            
            // 添加当前活跃状态
            element.classList.add('active');
            
            // 这里可以根据类型过滤订单列表
            console.log('切换到标签:', type);
        }

        // 跳转到订单详情页
        function goToOrderDetail(status) {
            // 这里可以传递订单状态参数到详情页
            window.location.href = `order-detail.html?status=${status}`;
        }
    </script>
</body>
</html> 